package io;

import java.io.*;

/*
进行对象的序列化和反序列化

 */
public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="李四";
        int age=36;
        String gender="高中";
        String[] otherInfo={"是一练习生","会唱歌","会跳舞","会打篮球"};
        Student ls=new Student(name,age,gender,otherInfo);
        System.out.println(ls);
        FileOutputStream fos=new FileOutputStream("student.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(ls);
        System.out.println("写出完毕");
        oos.close();

    }
}
